-- GENERATED SPELL FOR [Illidari Boneslicer] --


function spell0_22869(pUnit, Event) --@Cloak of Shadows,Self--
pUnit:FullCastSpellOnTarget(39666,pUnit)
pUnit:RegisterEvent('Sorts_22869', 5304, 1)
end

function spell1_22869(pUnit, Event) --@Gouge,n/a--
pUnit:FullCastSpellOnTarget(24698,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22869', 4290, 1)
end

function spell2_22869(pUnit, Event) --@Shadowstep,n/a--
pUnit:FullCastSpellOnTarget(41176,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22869', 1342, 1)
end

function Sorts_22869(pUnit, Event)
local choix_sorts_22869 = math.random(0, 2)
if choix_sorts_22869 == 0 then
pUnit:RegisterEvent('spell0_22869', 1, 1)
end
if choix_sorts_22869 == 1 then
pUnit:RegisterEvent('spell1_22869', 1, 1)
end
if choix_sorts_22869 == 2 then
pUnit:RegisterEvent('spell2_22869', 1, 1)
end
end

function mob22869_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22869', math.random(1500, 3000), 1)
end

function mob22869_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22869_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22869_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22869, 1, 'mob22869_Action')
RegisterUnitEvent(22869, 2, 'mob22869_Leave')
RegisterUnitEvent(22869, 3, 'mob22869_Kill')
RegisterUnitEvent(22869, 4, 'mob22869_Die')
